package com.harth.blemultiplatform.ble

import com.harth.blemultiplatform.ble.core.Phy
import com.harth.blemultiplatform.ble.core.PrimaryPhy
import platform.CoreBluetooth.CBPeripheral
import platform.Foundation.NSDate
import platform.Foundation.NSNumber
import platform.Foundation.timeIntervalSince1970

class NativeScanResult(val peripheral: CBPeripheral,
                       val advertisementData: Map<Any?, *>,
                       val RSSI: NSNumber): IScanResult {

    override val IPeripheral: IPeripheral = NativePeripheral(peripheral)

    override val isConnectable: Boolean
        get() = TODO("Not yet implemented")

    override val advertisingData: IAdvertisingData
        get() = TODO("Not yet implemented")

    override val rssi: Int
        get() = RSSI.intValue

    override val txPowerLevel: Int?
        get() = TODO("Not yet implemented")

    override val primaryPhy: PrimaryPhy
        get() = TODO("Not yet implemented")

    override val secondaryPhy: Phy?
        get() = TODO("Not yet implemented")

    override val timestamp: Long = NSDate.new()?.timeIntervalSince1970?.toLong() ?: 0L
}